package com.dianqiu.common.bean;

import java.sql.Timestamp;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import com.dianqiu.base.bean.BaseTO;
/**
 * DqLeagueMatches entity. @author Jason Huang
 */
@Entity
@Table(name = "dq_league_matches", catalog = "dq_dev")
public class DqLeagueMatchesTO extends BaseTO implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private DqLeagueMatchesIdTO id;
	private DqClubsTO dqClubsByHomeClbId;
	private DqLeaguesTO dqLeagues;
	private DqClubsTO dqClubsByAwayClbId;
	private Timestamp mthDate;
	private Integer homeScore;
	private Integer awayScore;
	
	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "lgId", column = @Column(name = "LG_ID", nullable = false)),
			@AttributeOverride(name = "round", column = @Column(name = "ROUND", nullable = false)),
			@AttributeOverride(name = "homeClbId", column = @Column(name = "HOME_CLB_ID", nullable = false)),
			@AttributeOverride(name = "awayClbId", column = @Column(name = "AWAY_CLB_ID", nullable = false)) })
	public DqLeagueMatchesIdTO getId() {
		return id;
	}

	public void setId(DqLeagueMatchesIdTO id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "HOME_CLB_ID", nullable = false, insertable = false, updatable = false)
	public DqClubsTO getDqClubsByHomeClbId() {
		return this.dqClubsByHomeClbId;
	}

	public void setDqClubsByHomeClbId(DqClubsTO dqClubsByHomeClbId) {
		this.dqClubsByHomeClbId = dqClubsByHomeClbId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "LG_ID", nullable = false, insertable = false, updatable = false)
	public DqLeaguesTO getDqLeagues() {
		return this.dqLeagues;
	}

	public void setDqLeagues(DqLeaguesTO dqLeagues) {
		this.dqLeagues = dqLeagues;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AWAY_CLB_ID", nullable = false, insertable = false, updatable = false)
	public DqClubsTO getDqClubsByAwayClbId() {
		return this.dqClubsByAwayClbId;
	}

	public void setDqClubsByAwayClbId(DqClubsTO dqClubsByAwayClbId) {
		this.dqClubsByAwayClbId = dqClubsByAwayClbId;
	}

	@Column(name = "MTH_DATE", length = 19)
	public Timestamp getMthDate() {
		return this.mthDate;
	}

	public void setMthDate(Timestamp mthDate) {
		this.mthDate = mthDate;
	}

	@Column(name = "HOME_SCORE")
	public Integer getHomeScore() {
		return this.homeScore;
	}

	public void setHomeScore(Integer homeScore) {
		this.homeScore = homeScore;
	}

	@Column(name = "AWAY_SCORE")
	public Integer getAwayScore() {
		return this.awayScore;
	}

	public void setAwayScore(Integer awayScore) {
		this.awayScore = awayScore;
	}

	

}